GXDTPMenuSelect
The Finder sends theGXDTPMenuSelect
message when the user chooses a menu item in the Printing menu for a specific printing device. You must override theGXDTPMenuSelect
message if you have added items to the Printing menu. Your override of theGXDTPMenuSelect
message must match the following formal declaration:
OSErr MyDTPMenuSelect (short id);
id
- The ID of the menu item chosen from the Printing menu by the user.
- function result
- An error code. The value
noErr
indicates that the operation was successful.DESCRIPTION
You need to override theGXDTPMenuSelect
message if you add items to the Printing menu. If the item selected is less than or equal to the number of items you have added, handle that item. If the value is positive, you need to subtract your total number of items from the item value before forwarding the message.If the value of the
id
parameter is less than or equal to the number of items that you added in your override of theGXGetDTPMenuList
message, then you need to handle the selection.If the
id
parameter is greater than the number of items that you added in theGXGetDTPMenuList
message, then you need to subtract this total from theid
parameter and forwardGXDTPMenuSelect
to enable the next message handler to utilize the message.SPECIAL CONSIDERATIONS
You never send theGXDTPMenuSelect
message yourself.If you override the
GXDTPMenuSelect
message, you also need to override theGXGetDTPMenuList
message.If you handle the chosen menu item, do not forward the
GXDTPMenuSelect
message. Otherwise, you must forward it.RESULT CODES
gxSegmentLoadFailedErr A required code segment could not be found,
or there was not enough memory to load it.gxPrUserAbortErr The user has canceled printing. SEE ALSO
TheGXGetDTPMenuList
message is described in the previous section.For more information about desktop printers and the Printing menu, see Inside Macintosh: QuickDraw GX Printing.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help